package com.ruoyi.system.utils;

import lombok.Getter;

/**
 * Created by chenyiyi
 * 2024-03-12 21:58:00
 */
@Getter
public enum ReturnMessage {
    SUCCESS(200, "成功"),
    SYSTEM_ERROR(101, "服务器发生异常,正在努力修复中..."),
    SIGN_ERROR(102, "签名错误"),
    PARAMS_NOT_EXISTS(103, "请求参数缺省,请核对"),
    NOT_NORMAL_REQUEST(104, "认证结果已过期,请重新认证"),
    LOGIN_TIMEOUT(105, "登录超时,请重新登录"),
    TOKEN_IS_NOT_VALID(106, "TOKEN非法"),
    PHONE_IS_ERROR(103, "请输入正确的手机号格式"),
    SERVICE_FLOW(107, "网络被挤爆了,请稍后重试"),
    PARAM_IS_ERROR(108, "请求参数有误"),
    CONNECTION_ERROR(109, "连接错误"),
    CONNECT_TIMEOUT(110, "连接超时"),
    SOCKET_TIMEOUT(111, "网路超时"),

    ROLE_IS_CANCEL(100009, "角色被封禁，请联系管理员"),
    USER_NAME_IS_ERROR(100001, "请输入正确的用户名"),
    PS_IS_ERROR(100002, "请输入正确的密码"),
    IMG_UPLOAD_ERROR(600001, "图片上传失败"),
    IMG_IS_NULL(600002, "图片为空"),

    LINK_ADDRESS_PARAMETER_FORMAT_ERROR(700001, "链接地址参数格式错误，请以http或https开头"),
    H_FIVE_PAGE_IS_NOT_EXISTS(700002, "h5网页不存在"),
    H_FIVE_SHARE_TITLE_IS_NULL(700003, "请填写分享标题"),
    H_FIVE_SHARE_DESC_IS_NULL(700004, "请填写分享简介"),
    H_FIVE_SHARE_IMG_URL_IS_NULL(700005, "请上传分享图片"),
    H_FIVE_SKIP_URL_DUPLICATE(700006, "h5网页链接已存在"),

    DATA_NOT_EXIST(10000000, "数据不存在"),

    PASSWORD_UPDATE_ERROR_EXCESSIVE(500068, "密码修改失败次数过多，15分钟后重试"),
    PSSWORD_ADN_CONFIMR_NOT_EQ(500005, "两次密码不一致，请重新输入！"),
    USER_NOT_EXISTS(404, "用户不存在"),
    PASSWORD_IS_NOT_SAFE(500067, "密码强度不够,请根据提示重新设置密码"),
    PASSWORD_ERROR_OLD(500002, "原密码错误，请重新输入"),
    PASSWORD_UPDATE_ERROR(500068, "密码修改失败");

    private String msg;

    private Integer code;

    ReturnMessage(Integer code, String msg) {
        this.msg = msg;
        this.code = code;
    }

    @Override
    public String toString() {
        return this.msg;
    }
}
